Optimal. Leaf size=53 \[ \frac{4 \sqrt{a \cos (c+d x)+a}}{d^2}+\frac{2 x \tan \left (\frac{c}{2}+\frac{d x}{2}\right ) \sqrt{a \cos (c+d x)+a}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0608678, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3319, 3296, 2638} \[ \frac{4 \sqrt{a \cos (c+d x)+a}}{d^2}+\frac{2 x \tan \left (\frac{c}{2}+\frac{d x}{2}\right ) \sqrt{a \cos (c+d x)+a}}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3319
Rule 3296
Rule 2638
Rubi steps
\begin{align*} \int x \sqrt{a+a \cos (c+d x)} \, dx &=\left (\sqrt{a+a \cos (c+d x)} \csc \left (\frac{1}{2} \left (c+\frac{\pi }{2}\right )+\frac{\pi }{4}+\frac{d x}{2}\right )\right ) \int x \sin \left (\frac{1}{2} \left (c+\frac{\pi }{2}\right )+\frac{\pi }{4}+\frac{d x}{2}\right ) \, dx\\ &=\frac{2 x \sqrt{a+a \cos (c+d x)} \tan \left (\frac{c}{2}+\frac{d x}{2}\right )}{d}-\frac{\left (2 \sqrt{a+a \cos (c+d x)} \csc \left (\frac{1}{2} \left (c+\frac{\pi }{2}\right )+\frac{\pi }{4}+\frac{d x}{2}\right )\right ) \int \sin \left (\frac{c}{2}+\frac{d x}{2}\right ) \, dx}{d}\\ &=\frac{4 \sqrt{a+a \cos (c+d x)}}{d^2}+\frac{2 x \sqrt{a+a \cos (c+d x)} \tan \left (\frac{c}{2}+\frac{d x}{2}\right )}{d}\\ \end{align*}
Mathematica [A] time = 0.128065, size = 34, normalized size = 0.64 \[ \frac{2 \left (d x \tan \left (\frac{1}{2} (c+d x)\right )+2\right ) \sqrt{a (\cos (c+d x)+1)}}{d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.218, size = 80, normalized size = 1.5 \begin{align*}{\frac{-i\sqrt{2} \left ( dx{{\rm e}^{i \left ( dx+c \right ) }}+2\,i{{\rm e}^{i \left ( dx+c \right ) }}-dx+2\,i \right ) }{ \left ({{\rm e}^{i \left ( dx+c \right ) }}+1 \right ){d}^{2}}\sqrt{a \left ({{\rm e}^{i \left ( dx+c \right ) }}+1 \right ) ^{2}{{\rm e}^{-i \left ( dx+c \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.52002, size = 82, normalized size = 1.55 \begin{align*} -\frac{2 \,{\left (\sqrt{2} \sqrt{a} c \sin \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) -{\left (\sqrt{2}{\left (d x + c\right )} \sin \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 2 \, \sqrt{2} \cos \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )} \sqrt{a}\right )}}{d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \sqrt{a \left (\cos{\left (c + d x \right )} + 1\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \cos \left (d x + c\right ) + a} x\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]